//common.js
/**
window.SUCCESS = 200;
window.SERVER_ERROR = 500;
window.ACCOUNT_PASS_ERROR = 1001;
window.ACCOUNT_LOCKED = 1002;
window.PASSWORD_ERROR = 1003;
window.ACCOUNT_EXISTS = 1004;
window.ACCOUNT_NOT_EXISTS = 1005;
window.MOBILE_EXISTS = 1006;
window.BALANCE_NOT_ENOUGH = 1007;
window.NOT_PERMISSION = 1008;
window.EXCEL_ERROR = 1009;
window.OVER_COUNT = 1010;
window.EXCEL_FORMAT = 1011;
window.PARAM_ERROR=1012; 
window.POINT_NOT_ENOUGH=1013; 
window.APPKEY_ERROR=1014;  
window.APPKEY_EXPIRED=1015;  
window.ACTIVITY_EXISTS_IN_DATE = 1017;
window.CANCEL_ORDER_INVALID_DATE = 1018;
window.SMS_EXPIRED = 1019;
window.CODE_ERROR = 1020;
window.CODE_EXPIRED = 1021;
window.TOKEN_ERROR = 1022;
window.TOKEN_EXPIRED = 1023;
window.EXCEL_OVERFLOW = 1024; 
 */

CH.common.showError = function(statusCode) {
	if(statusCode == SERVER_ERROR) {
		CH.utils.showMessageError('服务器错误，请联系管理员');
	}
	else if(statusCode == ACCOUNT_PASS_ERROR) {
		CH.utils.showMessageError('账号密码错误');
	}
	else if(statusCode == ACCOUNT_LOCKED) {
		CH.utils.showMessageError('账号已锁定');
	}
	else if(statusCode == PASSWORD_ERROR) {
		CH.utils.showMessageError('密码错误');
	}
	else if(statusCode == ACCOUNT_EXISTS) {
		CH.utils.showMessageError('账号已存在');
	}
	else if(statusCode == ACCOUNT_NOT_EXISTS) {
		CH.utils.showMessageError('账号不存在');
	}
	else if(statusCode == MOBILE_EXISTS) {
		CH.utils.showMessageError('手机号码已存在');
	}
	else if(statusCode == BALANCE_NOT_ENOUGH) {
		CH.utils.showMessageError('余额不足');
	}
	else if(statusCode == NOT_PERMISSION) {
		CH.utils.showMessageError('没有权限');
	}
	else if(statusCode == PARAM_ERROR) {
		CH.utils.showMessageError('参数错误');
	}
	else if(statusCode == POINT_NOT_ENOUGH) {
		CH.utils.showMessageError('积分不足');
	}
}

